package app.netant.finishbook.zxcs8;

import cn.lily.com.enviroment.Enviroment;
import cn.lily.com.lang.DeCode;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class Zxcs8Root extends BaseRoot {
	
	public Zxcs8Root(){
		this.homeUrl = "http://www.zxcs8.com/sort/55";
		this.pageUrl = "http://www.zxcs8.com/sort/55/page/";
		this.tableKey = "zxcs8";
	}

	@Override
	public String buildUrl(int pageIdx) {
		if(pageIdx == 1){
			return homeUrl;
		}
		return this.pageUrl + pageIdx;
	}

	@Override
	public BasePage buildPage(String url) {
		return new Zxcs8Page(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new Zxcs8Detail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new Zxcs8Entity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {

	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		Zxcs8Root root = new Zxcs8Root();
		//root.analyse(3);
		//root.excepCycle();
	}


	
}
